<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script type="text/javascript">
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
</script>
    <div class="content-wrap">
        <div class="wrapper" style="bottom: 50px;">
            <ul class="nav nav-tabs">
                <li class="active">
                    <a href="#"   onclick="loadDiv('mainCenterDiv','${ctx}/oper/clinicItemDict/index')">诊疗项目列表</a>
                </li>
                <li>
                    <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/oper/clinicItemDict/form')">诊疗项目添加</a>
                </li>
            </ul>
            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="table-responsive no-border">
                        <div class="datatable-top">
                            <div class="pull-left">
                            	<form:form id="searchForm" modelAttribute="clinicItemDict"  onsubmit="return loadDivForm('mainCenterDiv','searchForm','${ctx}/oper/clinicItemDict/index');" method="post" class="form-inline">
                                    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                    <label>项目分类：</label> <form:select path="itemClass" class="form-control"><form:option value="" label=""/>
                                        <form:options items="${fns:getDictList('BILL_ITEM_CLASS_DICT')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                                    </form:select>
                                    &nbsp;&nbsp;<label>项目代码 ：</label><form:input path="itemCode" htmlEscape="false" maxlength="50" class="form-control" />
                                    &nbsp;&nbsp;<label>项目名称 ：</label><form:input path="itemName" htmlEscape="false" maxlength="50" class="form-control" />
                                    &nbsp;&nbsp;<label>拼音码 ：</label><form:input path="inputCode" htmlEscape="false" maxlength="50" class="form-control" />
                                    &nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                                </form:form>
                            </div>
                        </div>
                        <table id="contentTable" class="table table-bordered mg-t datatable">
                            <thead>
                                <tr>
                                        <th>项目分类</th>
                                        <th>项目代码</th>
                                        <th>项目名称</th>
                                        <th>执行科室</th>
                                        <th>拼音码</th>
                                        <th>备注信息</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <c:forEach items="${page.list}" var="clinicItemDict">
                                <tr>
                                        <td> ${fns:getDictLabels(clinicItemDict.itemClass, 'BILL_ITEM_CLASS_DICT', '')}</td>
                                        <td> ${clinicItemDict.itemCode}</td>
                                        <td> ${clinicItemDict.itemName}</td>
                                        <td> ${clinicItemDict.orgDept.deptName}</td>
                                        <td> ${clinicItemDict.inputCode}</td>
                                        <td> ${clinicItemDict.remarks}</td>
                                        <td>
                                             <c:if test="${clinicItemDict.itemClass!='A' && clinicItemDict.itemClass!='B'}">
                                                <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/oper/clinicItemDict/addChargeForm?id=${clinicItemDict.id}')" class="btn btn-primary btn-xs">添加对照</a>
                                                <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/oper/clinicItemDict/form?id=${clinicItemDict.id}')" class="btn btn-success btn-xs">修改</a>
                                                <a href="#"  class="applyBt btn btn-danger btn-xs" onclick="confirmExtend('确认要删除该诊疗项目吗？',function(){delLoad('mainCenterDiv','${ctx}/oper/clinicItemDict/delete?id=${clinicItemDict.id}','${ctx}/oper/clinicItemDict/index')})">删除</a>
                                             </c:if>
                                        </td>
                                </tr>
                            </c:forEach>

                        </table>
                        <div class="pagination">${page}</div>
                    </div>
                </div>
            </section>
        </div>
    </div>